package com.project.controller;

import com.project.bean.CityBean;
import com.project.bean.ProvinceBean;
import com.project.service.IProvinceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("search")
public class SearchController {
    @Autowired
    private IProvinceService service;

    @RequestMapping("findAll")
    public List<ProvinceBean> findAll(){
        return service.findAll();
    }

    @RequestMapping("findById")
    public ProvinceBean findById(int id){
        return service.findById(id);
    }

}
